package com.yidi.system.service;

import com.yidi.common.core.domain.AjaxResult;
import com.yidi.common.core.domain.TreeSelect;
import com.yidi.common.core.domain.entity.SysDept;
import com.yidi.common.core.service.BaseService;

import java.util.List;

/**
 * @author ：Xn
 * @ClassName: SysDeptService
 * @date ：2021-10-19 14:35
 * @describe ：
 */
public interface SysDeptService extends BaseService<SysDept> {

    List<SysDept> selectDeptList(SysDept dept);

    void checkDeptDataScope(Long deptId);

    List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts);

    List<SysDept> buildDeptTree(List<SysDept> depts);

    List<Integer> selectDeptListByRoleId(Long roleId);

    String checkDeptNameUnique(SysDept dept);

    AjaxResult insertDept(SysDept dept);

    Integer selectNormalChildrenDeptById(Long deptId);

    void updateDept(SysDept dept);

    boolean hasChildByDeptId(Long deptId);

    boolean checkDeptExistUser(Long deptId);

    void deleteDeptById(Long deptId);
}
